﻿using System;
using System.Collections.Generic;

namespace Framework.Core.Collections
{
    [Serializable]
    public class RecrodList<T>
    {
        private List<T> _Datas;

        public RecrodList()
        {
        }

        public RecrodList(int totalCount, IList<T> datas)
        {
            _Datas = (List<T>) datas;
            TotalCount = totalCount;
        }

        public RecrodList(int totalCount, List<T> datas)
        {
            _Datas = datas;
            TotalCount = totalCount;
        }

        public int TotalCount { get; set; }

        public List<T> Datas
        {
            get
            {
                if (_Datas == null)
                {
                    _Datas = new List<T>();
                }
                return _Datas;
            }
            set { _Datas = value; }
        }
    }
}